package com.bawei.yangzongcai___chenmei.BlankFragment.TableLayoution;


import android.content.Context;
import android.widget.ImageView;

import com.bawei.yangzongcai___chenmei.MVC.BsaeFragment;
import com.bawei.yangzongcai___chenmei.R;
import com.bumptech.glide.Glide;
import com.youth.banner.Banner;
import com.youth.banner.BannerConfig;
import com.youth.banner.Transformer;
import com.youth.banner.loader.ImageLoader;

import java.util.ArrayList;
import java.util.List;


public class BlankFragmentTableLayout2 extends BsaeFragment {

    List<String> javabanner;
    private Banner bannertable2;

    @Override
    public int bandLayout() {
        return R.layout.fragment_blank_fragment_table_layout2;
    }

    @Override
    public void initView() {

        bannertable2 = findbandid(R.id.bannertable2);
    }

    @Override
    public void initDate() {
        javabanner = new ArrayList<>();

        javabanner.add("https://www.4kbizhi.com/d/file/2020/07/19/small163241AnT6D1595147561.jpg");
        javabanner.add("https://www.4kbizhi.com/d/file/2020/07/20/small161708oS7U71595233028.jpg");
        javabanner.add("https://www.4kbizhi.com/d/file/2020/07/20/small130638JKfO41595221598.jpg");
        javabanner.add("https://www.4kbizhi.com/d/file/2020/12/25/small112258Ct4rU1608866578.jpg");
        javabanner.add("https://www.4kbizhi.com/d/file/2020/08/06/small114553LYbX01596685553.jpg");
        javabanner.add("https://www.4kbizhi.com/d/file/2020/08/07/small1708509B8hQ1596791330.jpg");
        javabanner.add("https://www.4kbizhi.com/d/file/2020/08/07/small1707552QWnl1596791275.jpg");
        javabanner.add("https://www.4kbizhi.com/d/file/2020/07/25/small154128JFmh41595662888.jpg");
        javabanner.add("https://www.4kbizhi.com/d/file/2020/07/19/small1624361HfNO1595147076.jpg");
        javabanner.add("https://www.4kbizhi.com/d/file/2020/07/20/small125645xicaC1595221005.jpg");
        javabanner.add("https://www.4kbizhi.com/d/file/2020/07/20/small125740Lyklb1595221060.jpg");
        javabanner.add("https://www.4kbizhi.com/d/file/2020/07/20/small131538PoCy71595222138.jpg");
        javabanner.add("https://www.4kbizhi.com/d/file/2020/07/20/small162409hE0v41595233449.jpg");
        javabanner.add("https://www.4kbizhi.com/d/file/2020/07/20/small162211qPHNK1595233331.jpg");
        javabanner.add("https://www.4kbizhi.com/d/file/2020/07/19/small162329ApdMc1595147009.jpg");
        javabanner.add("https://www.4kbizhi.com/d/file/2020/07/19/small162158MLEoJ1595146918.jpg");
        javabanner.add("https://www.4kbizhi.com/d/file/2020/07/19/small162039bjiuz1595146839.jpg");
        bannertable2.setBannerAnimation(Transformer.CubeIn);
        bannertable2.setIndicatorGravity(BannerConfig.CENTER);
        bannertable2.setImages(javabanner);
        bannertable2.setBannerStyle(BannerConfig.CIRCLE_INDICATOR);
        bannertable2.setImageLoader(new ImageLoader() {
            @Override
            public void displayImage(Context context, Object path, ImageView imageView) {
                Glide.with(context).load(path).into(imageView);
            }
        }).start();
    }
}
